package fileServiceWindows;

import gui.WindowsApplication;

import java.util.ArrayList;

import javax.jws.WebService;

import entities.CSFileWrapper;
import entities.Device;


@WebService
public class FileServiceImp implements FileService{
	private WindowsApplication windowsApp;
	
	public FileServiceImp(){
		
	}
	
	public FileServiceImp(WindowsApplication windowsApp){
		this.windowsApp = windowsApp;
	}
	
	public ArrayList<String> getFileNames() {
		return windowsApp.getFileIO().getFileNames();
	}

	public CSFileWrapper getFile(String fileName) {
		return windowsApp.getFileIO().getFile(fileName);
	}
	
	public void sendFile(CSFileWrapper file){
		windowsApp.getFileIO().writeFile(file);
	}
	
	public Device getDevice(){
		return windowsApp.getDevice();
	}
}
